package com.lpit.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.lpit.dto.BarChartDto;
import com.lpit.dto.UserDto;
import com.lpit.pojo.User;
import com.baomidou.mybatisplus.extension.service.IService;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author Administrator
 * @description 针对表【user(用户表)】的数据库操作Service
 * @createDate 2023-06-08 11:06:01
 */

public interface UserService extends IService<User> {
    /**
     * 查看所有用户列表
     */
    public IPage<UserDto> lookUsers(Integer page, Integer pageSize, UserDto userDto);

    /**
     * 批量锁定用户
     */
    public boolean updateUsersStatus(List<Integer> integers, String status);


    /* 用户，修改密码功能 */
    public String reviseUserAdmin(String name, String password, String revisePassword);

    /**
     * 当日活跃用户
     * @author yao chen
     * */
    public String dailyActiveUsers();
    /**
     * 某段时间活跃用户
     * @author yao chen
     * */
    public String newUsers();
    /**
     * 查询日均活跃用户
     * @author yao chen
     * @retunt List
     */
    public List<BarChartDto> averageDailyActiveUsers();

    /**
     * 查询日均新增用户
     * @author yao chen
     * @retunt List
     */
    public List<BarChartDto> averageNewUserPerDay();
    /**
     * 查询某段时间的活跃用户
     * Query the active users in a specified period of time
     * @author yao chen
     */
    public List<BarChartDto> queryTheActiveUsersSpecifiedPeriodOfTime(String kDate, String jDate);

    public List<BarChartDto> userAddedWithinSpecifiedPeriod(String kDate, String jDate);
}
